# -*- coding: utf-8 -*-
# @Time    : 2024/12/1 下午3:15
# @Author  : wjx
# @Email   : kanxinxin@163.com
# @File    : diet_settings_page.py
# @Software: PyCharm
from appium.webdriver.common.appiumby import AppiumBy as By
from pages.base_page import BasePage

class DietSettingsPage(BasePage):
    # 定位器
    # 减重
    lose_weight_btn_locator = (By.ANDROID_UIAUTOMATOR, 'new UiSelector().description("减重")')
    # 女
    sex_btn_locator = (By.ANDROID_UIAUTOMATOR, 'new UiSelector().description("女")')
    # 更新
    update_btn_locator = (By.ANDROID_UIAUTOMATOR, 'new UiSelector().description("更新")')

    def click_lose_weight(self):
        """
        点击减重
        :return:None
        """
        self.find_element(self.lose_weight_btn_locator).click()

    def click_sex_women(self):
        """
        点击选中女
        :return:None
        """
        self.find_element(self.sex_btn_locator).click()

    def click_update(self):
        """
        点击更新
        :return:
        """
        self.find_element(self.update_btn_locator).click()
